function cs()
{       
   window.parent.location.href="/user/cp.php?ac=out";
}

$(document).ready(function() {
	var template="{{#results}}<tr style='border-bottom:1px;'><td>{{mysum}}</td><td>{{littleSum}}</td></tr>{{/results}}"

	drawhtml=function(result){
		var html=Mustache.to_html(template,result);
		$("tbody").html(html);
	}
   $("#look").click(function(){
	   var yeah=$("#year").val();
		   var month=$("#month").val();
		   $.ajax({
			url: "/user/lookformonth.php",
			dataType: 'json',
			data: "y="+yeah+"&m="+month,
			contentType:"text/html",
			type:"GET",
			success: function (result){
				drawhtml(result);
			},
			error: function(error){alert(error)}
			});	   
	   });
});